<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>octant.ocean.step3d_t</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="octant-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="octant-module.html">Package&nbsp;octant</a> ::
        <a href="octant.ocean-module.html">Package&nbsp;ocean</a> ::
        Module&nbsp;step3d_t
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="octant.ocean.step3d_t-module.html">Module octant.ocean.step3d_t</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># encoding: utf-8</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">step3d_t.py</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">Created by Rob Hetland on 2007-10-24.</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">Copyright (c) 2007 Texas A&amp;M Univsersity. All rights reserved.</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">Release under MIT license.</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">numpy</tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">pylab</tt> <tt class="py-keyword">as</tt> <tt class="py-name">pl</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">scipy</tt><tt class="py-op">.</tt><tt class="py-name">interpolate</tt> <tt class="py-keyword">import</tt> <tt class="py-name">interp1d</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Package octant=octant-module.html"><a title="octant" class="py-name" href="#" onclick="return doclink('link-0', 'octant', 'link-0');">octant</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name"><a title="octant" class="py-name" href="#" onclick="return doclink('link-1', 'octant', 'link-0');">octant</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Module octant.roms=octant.roms-module.html"><a title="octant.roms" class="py-name" href="#" onclick="return doclink('link-2', 'roms', 'link-2');">roms</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">_step3d_t</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"> </tt>
<a name="Step3d_t"></a><div id="Step3d_t-def"><a name="L20"></a><tt class="py-lineno">20</tt> <a class="py-toggle" href="#" id="Step3d_t-toggle" onclick="return toggle('Step3d_t');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="octant.ocean.step3d_t.Step3d_t-class.html">Step3d_t</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Step3d_t-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Step3d_t-expanded"><a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">    <tt class="py-docstring">"""docstring for Step3d_t"""</tt> </tt>
<a name="Step3d_t.__init__"></a><div id="Step3d_t.__init__-def"><a name="L22"></a><tt class="py-lineno">22</tt> <a class="py-toggle" href="#" id="Step3d_t.__init__-toggle" onclick="return toggle('Step3d_t.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.ocean.step3d_t.Step3d_t-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">nc</tt><tt class="py-op">,</tt> <tt class="py-param">grd</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">AKt_bak</tt><tt class="py-op">=</tt><tt class="py-number">1e-5</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Step3d_t.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Step3d_t.__init__-expanded"><a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nc</tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name"><a title="octant" class="py-name" href="#" onclick="return doclink('link-3', 'octant', 'link-0');">octant</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module octant.io=octant.io-module.html"><a title="octant.io" class="py-name" href="#" onclick="return doclink('link-4', 'io', 'link-4');">io</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Function octant.io.Dataset()=octant.io-module.html#Dataset"><a title="octant.io.Dataset" class="py-name" href="#" onclick="return doclink('link-5', 'Dataset', 'link-5');">Dataset</a></tt><tt class="py-op">(</tt><tt class="py-name">nc</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dt</tt> <tt class="py-op">=</tt> <tt class="py-name">nc</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt><tt class="py-op">[</tt><tt class="py-string">'dt'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">grd</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grd</tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="octant" class="py-name" href="#" onclick="return doclink('link-6', 'octant', 'link-0');">octant</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="octant.roms" class="py-name" href="#" onclick="return doclink('link-7', 'roms', 'link-2');">roms</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Function octant.roms.nc_grid()=octant.roms-module.html#nc_grid"><a title="octant.roms.nc_grid" class="py-name" href="#" onclick="return doclink('link-8', 'nc_grid', 'link-8');">nc_grid</a></tt><tt class="py-op">(</tt><tt class="py-name">nc</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grd</tt> <tt class="py-op">=</tt> <tt class="py-name">grd</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rmask</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grd</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Variable octant.grid.CGrid.mask=octant.grid.CGrid-class.html#mask"><a title="octant.grid.CGrid.mask" class="py-name" href="#" onclick="return doclink('link-9', 'mask', 'link-9');">mask</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pm</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grd</tt><tt class="py-op">.</tt><tt class="py-name">pm</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pn</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">grd</tt><tt class="py-op">.</tt><tt class="py-name">pn</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ocean_time</tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="octant" class="py-name" href="#" onclick="return doclink('link-10', 'octant', 'link-0');">octant</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Module octant.cf=octant.cf-module.html"><a title="octant.cf" class="py-name" href="#" onclick="return doclink('link-11', 'cf', 'link-11');">cf</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Class octant.cf.time=octant.cf.time-class.html,Module octant.ocean.time=octant.ocean.time-module.html,Class octant.ocean.time.time=octant.ocean.time.time-class.html"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-12', 'time', 'link-12');">time</a></tt><tt class="py-op">(</tt><tt class="py-name">nc</tt><tt class="py-op">,</tt> <tt class="py-name">name</tt><tt class="py-op">=</tt><tt class="py-string">'ocean_time'</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">z_w</tt> <tt class="py-op">=</tt> <tt id="link-13" class="py-name"><a title="octant" class="py-name" href="#" onclick="return doclink('link-13', 'octant', 'link-0');">octant</a></tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="octant.roms" class="py-name" href="#" onclick="return doclink('link-14', 'roms', 'link-2');">roms</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Class octant.roms.nc_depths=octant.roms.nc_depths-class.html"><a title="octant.roms.nc_depths" class="py-name" href="#" onclick="return doclink('link-15', 'nc_depths', 'link-15');">nc_depths</a></tt><tt class="py-op">(</tt><tt class="py-name">nc</tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name" targets="Module octant.grid=octant.grid-module.html"><a title="octant.grid" class="py-name" href="#" onclick="return doclink('link-16', 'grid', 'link-16');">grid</a></tt><tt class="py-op">=</tt><tt class="py-string">'w'</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-17', 'time', 'link-12');">time</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ocean_time</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lidx</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">999</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'AKt'</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">nc</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-string">' ### Warning -- AKt not found, using AKt_bak = %5.3e'</tt> <tt class="py-op">%</tt> <tt class="py-name">AKt_bak</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_AKt_bak</tt> <tt class="py-op">=</tt> <tt class="py-name">AKt_bak</tt> </tt>
</div><a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">     </tt>
<a name="Step3d_t.step"></a><div id="Step3d_t.step-def"><a name="L40"></a><tt class="py-lineno">40</tt> <a class="py-toggle" href="#" id="Step3d_t.step-toggle" onclick="return toggle('Step3d_t.step');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.ocean.step3d_t.Step3d_t-class.html#step">step</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">static</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Step3d_t.step-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Step3d_t.step-expanded"><a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-docstring">"""docstring for fname"""</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">         </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">        <tt class="py-name">lidx</tt> <tt class="py-op">=</tt> <tt class="py-name">argwhere</tt><tt class="py-op">(</tt><tt class="py-name">abs</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ocean_time</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-18', 'time', 'link-12');">time</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">max</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">lidx</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lidx</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lidx</tt> <tt class="py-op">=</tt> <tt class="py-name">lidx</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_uidx</tt> <tt class="py-op">=</tt> <tt class="py-name">lidx</tt><tt class="py-op">+</tt><tt class="py-number">2</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_uidx</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ocean_time</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_uidx</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">             </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">=</tt><tt id="link-19" class="py-name" targets="Module octant.slice=octant.slice-module.html"><a title="octant.slice" class="py-name" href="#" onclick="return doclink('link-19', 'slice', 'link-19');">slice</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lidx</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_uidx</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tstart</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ocean_time</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tend</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ocean_time</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">             </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_z_wi</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">z_w</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">]</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ui</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nc</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt><tt class="py-op">[</tt><tt class="py-string">'u'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">]</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vi</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nc</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt><tt class="py-op">[</tt><tt class="py-string">'v'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">]</tt> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_AKti</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nc</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt><tt class="py-op">[</tt><tt class="py-string">'AKt'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tidx</tt><tt class="py-op">]</tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_AKti</tt> <tt class="py-op">=</tt> <tt class="py-name">zeros_like</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_z_wi</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_AKt_bak</tt> </tt>
<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line">         </tt>
<a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line">        <tt class="py-name">w0</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tend</tt><tt class="py-op">-</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-20', 'time', 'link-12');">time</a></tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tend</tt><tt class="py-op">-</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_tstart</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">        <tt class="py-name">w1</tt> <tt class="py-op">=</tt> <tt class="py-number">1.0</tt> <tt class="py-op">-</tt> <tt class="py-name">w0</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trc</tt> <tt class="py-op">=</tt> <tt class="py-name">_step3d_t</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Module octant.ocean.step3d_t=octant.ocean.step3d_t-module.html"><a title="octant.ocean.step3d_t" class="py-name" href="#" onclick="return doclink('link-21', 'step3d_t', 'link-21');">step3d_t</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dt</tt><tt class="py-op">,</tt>  </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line">                          <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rmask</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pm</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pn</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt>  </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">                          <tt class="py-op">(</tt><tt class="py-name">w0</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_z_wi</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">w1</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_z_wi</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">                          <tt class="py-op">(</tt><tt class="py-name">w0</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_AKti</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">w1</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_AKti</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">                          <tt class="py-op">(</tt><tt class="py-name">w0</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ui</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">w1</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ui</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">                          <tt class="py-op">(</tt><tt class="py-name">w0</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vi</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">w1</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vi</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">,</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line">                          <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trc</tt><tt class="py-op">.</tt><tt class="py-name">T</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">T</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">         </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'time=%9.2f, mean=%7.3e, min=%7.3e, max=%7.3e'</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line">              <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-22', 'time', 'link-12');">time</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trc</tt><tt class="py-op">.</tt><tt class="py-name">mean</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trc</tt><tt class="py-op">.</tt><tt class="py-name">min</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trc</tt><tt class="py-op">.</tt><tt class="py-name">max</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">         </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">static</tt> <tt class="py-keyword">is</tt> <tt class="py-name">False</tt><tt class="py-op">:</tt> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-23', 'time', 'link-12');">time</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="octant.cf.time
octant.ocean.time
octant.ocean.time.time" class="py-name" href="#" onclick="return doclink('link-24', 'time', 'link-12');">time</a></tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dt</tt> </tt>
</div></div><a name="L76"></a><tt class="py-lineno">76</tt>  <tt class="py-line">         </tt>
<a name="L77"></a><tt class="py-lineno">77</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno">78</tt>  <tt class="py-line">    <tt class="py-name">nc</tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="octant" class="py-name" href="#" onclick="return doclink('link-25', 'octant', 'link-0');">octant</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="octant.io" class="py-name" href="#" onclick="return doclink('link-26', 'io', 'link-4');">io</a></tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Function octant.io.MFDataset()=octant.io-module.html#MFDataset"><a title="octant.io.MFDataset" class="py-name" href="#" onclick="return doclink('link-27', 'MFDataset', 'link-27');">MFDataset</a></tt><tt class="py-op">(</tt><tt class="py-string">'/Volumes/Hetland_merrimack/field_2007/steady/ocean_1750*.nc'</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno">79</tt>  <tt class="py-line">    <tt id="link-28" class="py-name" targets="Method octant.ocean.step3d_t.Step3d_t.step()=octant.ocean.step3d_t.Step3d_t-class.html#step"><a title="octant.ocean.step3d_t.Step3d_t.step" class="py-name" href="#" onclick="return doclink('link-28', 'step', 'link-28');">step</a></tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name" targets="Class octant.ocean.step3d_t.Step3d_t=octant.ocean.step3d_t.Step3d_t-class.html"><a title="octant.ocean.step3d_t.Step3d_t" class="py-name" href="#" onclick="return doclink('link-29', 'Step3d_t', 'link-29');">Step3d_t</a></tt><tt class="py-op">(</tt><tt class="py-name">nc</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno">80</tt>  <tt class="py-line">    <tt id="link-30" class="py-name"><a title="octant.ocean.step3d_t.Step3d_t.step" class="py-name" href="#" onclick="return doclink('link-30', 'step', 'link-28');">step</a></tt><tt class="py-op">.</tt><tt class="py-name">dt</tt><tt class="py-op">=</tt><tt class="py-number">5.0</tt> </tt>
<a name="L81"></a><tt class="py-lineno">81</tt>  <tt class="py-line">    <tt id="link-31" class="py-name" targets="Variable octant.grid.BoundaryInteractor.y=octant.grid.BoundaryInteractor-class.html#y,Variable octant.grid.CGrid.y=octant.grid.CGrid-class.html#y"><a title="octant.grid.BoundaryInteractor.y
octant.grid.CGrid.y" class="py-name" href="#" onclick="return doclink('link-31', 'y', 'link-31');">y</a></tt><tt class="py-op">,</tt> <tt id="link-32" class="py-name" targets="Variable octant.grid.BoundaryInteractor.x=octant.grid.BoundaryInteractor-class.html#x,Variable octant.grid.CGrid.x=octant.grid.CGrid-class.html#x"><a title="octant.grid.BoundaryInteractor.x
octant.grid.CGrid.x" class="py-name" href="#" onclick="return doclink('link-32', 'x', 'link-32');">x</a></tt> <tt class="py-op">=</tt> <tt id="link-33" class="py-name" targets="Variable octant.ocean.depths.mgrid=octant.ocean.depths-module.html#mgrid,Variable octant.ocean.mgrid=octant.ocean-module.html#mgrid,Variable octant.ocean.state.mgrid=octant.ocean.state-module.html#mgrid,Variable octant.ocean.step3d_t.mgrid=octant.ocean.step3d_t-module.html#mgrid,Variable octant.ocean.time.mgrid=octant.ocean.time-module.html#mgrid,Variable octant.ocean.velocity.mgrid=octant.ocean.velocity-module.html#mgrid"><a title="octant.ocean.depths.mgrid
octant.ocean.mgrid
octant.ocean.state.mgrid
octant.ocean.step3d_t.mgrid
octant.ocean.time.mgrid
octant.ocean.velocity.mgrid" class="py-name" href="#" onclick="return doclink('link-33', 'mgrid', 'link-33');">mgrid</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">:</tt><tt class="py-number">258</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt><tt class="py-number">514</tt><tt class="py-op">]</tt> </tt>
<a name="L82"></a><tt class="py-lineno">82</tt>  <tt class="py-line">    <tt id="link-34" class="py-name"><a title="octant.ocean.step3d_t.Step3d_t.step" class="py-name" href="#" onclick="return doclink('link-34', 'step', 'link-28');">step</a></tt><tt class="py-op">.</tt><tt class="py-name">trc</tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name" targets="Variable octant.ocean.depths.sin=octant.ocean.depths-module.html#sin,Variable octant.ocean.sin=octant.ocean-module.html#sin,Variable octant.ocean.state.sin=octant.ocean.state-module.html#sin,Variable octant.ocean.step3d_t.sin=octant.ocean.step3d_t-module.html#sin,Variable octant.ocean.time.sin=octant.ocean.time-module.html#sin,Variable octant.ocean.velocity.sin=octant.ocean.velocity-module.html#sin"><a title="octant.ocean.depths.sin
octant.ocean.sin
octant.ocean.state.sin
octant.ocean.step3d_t.sin
octant.ocean.time.sin
octant.ocean.velocity.sin" class="py-name" href="#" onclick="return doclink('link-35', 'sin', 'link-35');">sin</a></tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="octant.grid.BoundaryInteractor.x
octant.grid.CGrid.x" class="py-name" href="#" onclick="return doclink('link-36', 'x', 'link-32');">x</a></tt><tt class="py-op">*</tt><tt class="py-number">8</tt><tt class="py-op">*</tt><tt id="link-37" class="py-name" targets="Variable octant.ocean.depths.pi=octant.ocean.depths-module.html#pi,Variable octant.ocean.pi=octant.ocean-module.html#pi,Variable octant.ocean.state.pi=octant.ocean.state-module.html#pi,Variable octant.ocean.step3d_t.pi=octant.ocean.step3d_t-module.html#pi,Variable octant.ocean.time.pi=octant.ocean.time-module.html#pi,Variable octant.ocean.velocity.pi=octant.ocean.velocity-module.html#pi"><a title="octant.ocean.depths.pi
octant.ocean.pi
octant.ocean.state.pi
octant.ocean.step3d_t.pi
octant.ocean.time.pi
octant.ocean.velocity.pi" class="py-name" href="#" onclick="return doclink('link-37', 'pi', 'link-37');">pi</a></tt><tt class="py-op">/</tt><tt id="link-38" class="py-name"><a title="octant.grid.BoundaryInteractor.x
octant.grid.CGrid.x" class="py-name" href="#" onclick="return doclink('link-38', 'x', 'link-32');">x</a></tt><tt class="py-op">.</tt><tt class="py-name">max</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt id="link-39" class="py-name" targets="Variable octant.ocean.depths.newaxis=octant.ocean.depths-module.html#newaxis,Variable octant.ocean.newaxis=octant.ocean-module.html#newaxis,Variable octant.ocean.state.newaxis=octant.ocean.state-module.html#newaxis,Variable octant.ocean.step3d_t.newaxis=octant.ocean.step3d_t-module.html#newaxis,Variable octant.ocean.time.newaxis=octant.ocean.time-module.html#newaxis,Variable octant.ocean.velocity.newaxis=octant.ocean.velocity-module.html#newaxis"><a title="octant.ocean.depths.newaxis
octant.ocean.newaxis
octant.ocean.state.newaxis
octant.ocean.step3d_t.newaxis
octant.ocean.time.newaxis
octant.ocean.velocity.newaxis" class="py-name" href="#" onclick="return doclink('link-39', 'newaxis', 'link-39');">newaxis</a></tt><tt class="py-op">,</tt><tt class="py-op">:</tt><tt class="py-op">,</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-op">*</tt> <tt class="py-name">ones</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">30</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name"><a title="octant.ocean.depths.newaxis
octant.ocean.newaxis
octant.ocean.state.newaxis
octant.ocean.step3d_t.newaxis
octant.ocean.time.newaxis
octant.ocean.velocity.newaxis" class="py-name" href="#" onclick="return doclink('link-40', 'newaxis', 'link-39');">newaxis</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name"><a title="octant.ocean.depths.newaxis
octant.ocean.newaxis
octant.ocean.state.newaxis
octant.ocean.step3d_t.newaxis
octant.ocean.time.newaxis
octant.ocean.velocity.newaxis" class="py-name" href="#" onclick="return doclink('link-41', 'newaxis', 'link-39');">newaxis</a></tt><tt class="py-op">]</tt> </tt>
<a name="L83"></a><tt class="py-lineno">83</tt>  <tt class="py-line">    <tt id="link-42" class="py-name"><a title="octant.ocean.step3d_t.Step3d_t.step" class="py-name" href="#" onclick="return doclink('link-42', 'step', 'link-28');">step</a></tt><tt class="py-op">.</tt><tt class="py-name">static_step</tt><tt class="py-op">(</tt><tt class="py-number">17</tt><tt class="py-op">,</tt> <tt class="py-number">500</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno">84</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="octant-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    on Mon Apr 20 11:56:32 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
